<%--
  Created by IntelliJ IDEA.
  User: 86150
  Date: 2023/3/23
  Time: 15:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script charset="UTF-8" src="<%=request.getContextPath()%>/js/jquery-1.12.4.min.js"></script>
<script src="<%=request.getContextPath()%>/frontEndjs/registersVerify.js"></script>
<html>
<head>
    <title>会员注册页面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style-type: none;
        }

        .reg-content {
            padding: 30px;
            margin: 3px;
        }

        a,
        img {
            border: 0;
        }

        .log {
            color: #333333;
            font-weight: 700;
        }

        .big {

            font-weight: 700;
        }

        html {
            height: 100%;
            width: 100%;
            overflow: hidden;
            margin: 0;
            padding: 0;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            -moz-background-size: 100% 100%;
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
        }

        table {
            border-collapse: collapse;
            border-spacing: 0;
        }

        td,
        th {
            padding: 0;
            height: 70px;
        }

        .inputs {
            vertical-align: top;
        }

        .clear {
            clear: both;
        }

        .clear:before,
        .clear:after {
            content: "";
            display: table;
        }

        .clear:after {
            clear: both;
        }

        .form-div {
            background-color: rgba(255, 255, 255, 0.27);
            border-radius: 10px;
            border: 1px solid #aaa;
            width: 424px;
            margin-top: 10px;
            margin-left: 700px;
            padding: 30px 0 20px 0px;
            font-size: 16px;
            box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 0.5), 0px 0px 15px rgba(75, 75, 75, 0.3);
            text-align: left;
        }

        .form-div input[type="text"],
        .form-div input[type="password"],
        .form-div input[type="email"] {
            width: 268px;
            margin: 10px;
            line-height: 20px;
            font-size: 16px;
        }

        .form-div input[type="checkbox"] {
            margin: 20px 0 20px 10px;
        }

        .form-div input[type="button"],
        .form-div input[type="submit"] {
            margin: 10px 20px 0 0;
        }

        .form-div table {
            margin: 0 auto;
            text-align: right;
            color: rgba(64, 64, 64, 1.00);
        }

        .form-div table img {
            vertical-align: middle;
            margin: 0 0 5px 0;
        }

        .footer {
            color: rgba(64, 64, 64, 1.00);
            font-size: 12px;
            margin-top: 30px;
        }

        .form-div .buttons {
            float: right;
        }

        input[type="text"],
        input[type="password"],
        input[type="email"] {
            border-radius: 8px;
            box-shadow: inset 0 2px 5px #eee;
            padding: 10px;
            border: 1px solid #D4D4D4;
            color: #333333;
            margin-top: 5px;
        }

        input[type="text"]:focus,
        input[type="password"]:focus,
        input[type="email"]:focus {
            border: 1px solid #50afeb;
            outline: none;
        }

        input[type="button"],
        input[type="submit"] {
            padding: 7px 15px;
            background-color: #3c6db0;
            text-align: center;
            border-radius: 5px;
            overflow: hidden;
            min-width: 80px;
            border: none;
            color: #FFF;
            box-shadow: 1px 1px 1px rgba(75, 75, 75, 0.3);
        }


        input[type="button"]:active,
        input[type="submit"]:active {
            background-color: #5a88c8;
        }

        .err_msg {
            color: red;
            padding-right: 30px;
        }

        #reg_btn {
            margin-right: 50px;
            width: 285px;
            height: 45px;
            margin-top: 20px;
            background-color: rgba(201, 120, 21, .4);
        }

        #checkCode {
            width: 100px;
        }

        #changeImg {
            color: #333333;
        }
        #nan{
            width: 20px;
            height: 20px;
        }
        #nv{
            width: 20px;
            height: 20px;
            margin-left: 120px;
        }
        .gender{
            padding-right: 60px;
        }

        .verify{
            color: darkgrey;
        }

        .verify_true{
            width: 30px;
            height: 30px;
            position: relative;
            left: 5px;
            top: 12px;
            background: url("../img/housing/formValidator/y.png") no-repeat;
            background-size: 23px 23px;
            color: green;
        }

        .verify_false{
            background: url("../img/housing/formValidator/n.png") no-repeat 0 15px;
            background-size: 23px 23px;
            color: red;
        }
    </style>
</head>
<body>
<form action="<%=request.getContextPath()%>/FrontEnd?type=register" method="post" id="form">
    <input type="hidden" id="appPath" value="<%=request.getContextPath()%>">
    <div class="reg-content">
        <h1>欢迎注册</h1>
        <span>已有帐号？</span> <a href="<%=request.getContextPath()%>/frontEndjsp/logins.jsp" class="log">登录</a>
    </div>
        <table>

            <tr>
                <td class="big">用户名</td>
                <td class="inputs">
                    <input name="manageName" type="text" id="username" required>
                    <br>
                    <span id="username_err" class="err_msg"></span>

                </td>

            </tr>

            <tr>
                <td class="big">密码</td>
                <td class="inputs">
                    <input name="password" type="password" id="password" required>
                    <br>
                    <span id="password_err" class="err_msg"></span>
                </td>
            </tr>

            <tr>
                <td class="big">电话号</td>
                <td class="inputs">
                    <input name="mobilePhone" type="text" id="telephone" required>
                    <br>
                    <span id="telephone_err" class="err_msg"></span>
                </td>
            </tr>


            <tr>
                <td class="big">身份证号</td>
                <td class="inputs">
                    <input name="identityCard" type="text" id="identity" required>
                    <br>
                    <span id="identity_err" class="err_msg"></span>
                </td>
            </tr>

            <tr>
                <td class="big">性别</td>
                <td class="gender">
                    <input type="radio" name="sex" id="nan" value="男"><label for="nan" class="nan">男</label>
                    <input type="radio" name="sex" id="nv" value="女"> <label for="nv">女</label>
                </td>
            </tr>

            <tr>
                <td class="big">验证码</td>
                <td class="inputs">
                    <input name="checkCode" type="text" id="checkCode">
                    <img id="changCodeeImg" src="<%=request.getContextPath()%>/hotel/checkServlet">
                    <a href="#" id="changeImg">看不清？</a>
                </td>
            </tr>

        </table>

        <div class="buttons">
            <input value="注 册" type="submit" id="reg_btn">
        </div>
        <br class="clear">
    </form>

    </div>


    <script>
        /**
         * 验证码功能
         */
        document.getElementById("changeImg").onclick = function (){
            document.getElementById("changCodeeImg").src = "<%=request.getContextPath()%>/hotel/checkServlet?" + new Date().getMilliseconds();
        }
    </script>

</form>
</body>
</html>